package com.hkp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hkp.pojo.ResearchProject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ResearchProjectMapper extends BaseMapper<ResearchProject> {
    // 动态查询项目
    List<ResearchProject> dynamicQuery(@Param("title") String title,
                                      @Param("collegeId") Integer collegeId,
                                      @Param("status") Integer status);
    
    // 按学院统计项目数量
    List<Map<String, Object>> getProjectCountByCollege();
    
    // 按状态统计项目数量
    List<Map<String, Object>> getProjectCountByStatus();
}